home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 11 / CU Amiga Magazine's Super CD-ROM 11 (1997)(EMAP Images)(GB)(Track 1 of 3)[!][issue 1997-06].iso / s / autosave.pprx < prev    next >
Text File  |  1993-01-24  |  1KB  |  53 lines

  1. /*
  2. @BAutoSave  @P@ICopyright Gold Disk Inc., February, 1992
  3. This Genie will prompt the user to save at a specified time interval. You may optionally have the current file backed up.
  4. */
  5. cr = '0a'x
  6. arg options
  7.  
  8. interval = word(options, 1)
  9. backup    = word(options, 2)
  10.  
  11. tval = getclip(ppautosave)
  12.  
  13. if tval = '' then
  14. do
  15.     startas = 1
  16.     tval = 5
  17. end
  18.  
  19. if ~exists("rexx:ppageautosave.rexx") then
  20.     exit_msg("Unable to find ppage autosave Genie in rexx: directory")
  21.  
  22. if interval = '' then
  23. do
  24.     response = upper(ppm_GetForm("Enter Time interval", 8, "Time interval in minutes:"tval||cr"Create backup file Y/N:Y"))
  25.     if response = '' then exit_msg()
  26.     parse var response tval '0a'x backup
  27.     if tval = '' | ~datatype(tval, n) | tval < 0  then exit_msg("Invalid Entry")
  28. end
  29.  
  30.  
  31. if backup   ~= 'Y' then backup = 'N'
  32.  
  33.  
  34. call setclip(ppautosave, tval)
  35. if startas ~= 1 then exit
  36.  
  37. address command
  38. 'run >nil:' "rx rexx:ppageautosave.rexx "backup
  39.  
  40. exit_msg()
  41.  
  42. exit_msg: procedure
  43. do
  44.  
  45.     parse arg message
  46.  
  47.     if message ~= '' then
  48.    call ppm_Inform(1, message, )
  49.  
  50.     exit
  51.  
  52. end